In a conventional non-adaptive Huffman compression technique, the data block that is desired to undergo compression is analyzed, in a first pass, to determine symbol frequencies, and Huffman code is generated, based upon the determined symbol frequencies, in a second pass. Generating the Huffman code based upon the symbol frequencies determined from analysis the particular data block undergoing compression may be referred to as dynamic coding, in contradistinction to static coding based upon preselected symbol frequencies. The data block also is processed to substitute symbols into variable length prefix codes. This conventional technique typically is difficult and costly to implement using conventional embedded hardware, since significant on-chip memory and/or relatively high processing throughput constraints may exist for and/or be imposed upon such hardware. Also, in this conventional technique, additional latency results from executing the second pass. In at least some situations and/or applications, this may increase the amount of storage utilized to an undesirable level, may decrease resulting system performance to a level that is unacceptable from a user standpoint, and/or may make it difficult to achieve desired quality of service and/or other parameters. Additionally, if a single static code is employed instead of dynamic code, the resulting compression ratio may be significantly less (e.g., on average, between five and twenty percent less), depending upon the particular type of data being compressed, than it may have been if dynamic code were employed.
One proposed solution involves the use of four static trees, in addition to those typically employed, that may be thought to provide desirable compression ratios for at least certain types of data. In this proposed solution, the resultant compressed file includes an identification code that determines which types of codes were employed in the compression. The decompression algorithm then employs the identification code to determine how to decompress the compressed file. Inasmuch as the code trees used to compress the data are not themselves transmitted with the compressed file, in order to be able to decompress the compressed file, the particular trees that correspond to the identification codes are pre-programmed into the decompression algorithm. As can be readily appreciated, unless the decompression algorithm is pre-programmed with the trees and which identification codes represent which trees, the decompression algorithm cannot decompress the compressed file. This results in significant disadvantages, such as, the difficulty to use and/or adapt this technique for use with currently existing applications.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art. Accordingly, it is intended that the claimed subject matter be viewed broadly.